//\u5904\u7406\u63d0\u4ea4\u4fe1\u606f
function doMethod(methodflag){
    //\u9a8c\u8bc1\u534f\u8bae\u662f\u5426\u5df2\u9605\u8bfb
    if(document.all.service.checked==false){
    alert("\u5df2\u9605\u8bfb\uff0c\u8bf7\u6253\u52fe\uff01");
    return;
    }
    //\u9a8c\u8bc1\u7528\u6237\u59d3\u540d
    if(document.all.name.value!="" || document.all.name.value.length>0){
    var s=document.all.name.value;
    var myreg = /^[\u4E00-\u9FA5]+$/gi;
        if(!s.match(myreg)){
        alert("\u7528\u6237\u59d3\u540d\u5fc5\u987b\u4e3a\u4e2d\u6587\u540d!");
        return;
        }
      }
    //\u9a8c\u8bc1\u6c11\u65cf\u9879\u7684\u586b\u5199
    if(document.all.nation[1].checked && (document.all.othersnation.value=="" || document.all.othersnation.value.length<1) ){
    alert("\u5176\u5b83\u6c11\u65cf\u4e0d\u80fd\u4e3a\u7a7a!");
	return;
	}
	
    //\u9a8c\u8bc1\u51fa\u751f\u65e5\u671f
    if(document.all.birthday.value!="" || document.all.birthday.value.length>0){
    var s=document.all.birthday.value;
    var myreg = /^((((1[6-9]|[2-9]\d)\d{2})-(0[13578]|1[02])-(0[1-9]|[12]\d|3[01]))|(((1[6-9]|[2-9]\d)\d{2})-(0[13456789]|1[012])-(0[1-9]|[12]\d|30))|(((1[6-9]|[2-9]\d)\d{2})-02-(0[1-9]|1\d|2[0-8]))|(((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))-02-29))$/gi;
        if(!s.match(myreg)){
        alert("\u51fa\u751f\u65e5\u671f\u683c\u5f0f\u4e0d\u6b63\u786e\uff01");
        return;
        }
      }
    //\u9a8c\u8bc1\u8eab\u4efd\u8bc1\u53f7
    if(document.all.idcard.value!="" || document.all.idcard.value.length>0){
    var s=document.all.idcard.value;
    var myreg = /^(\d{15}$|^\d{18}$|^\d{17}(\d|X|x))$/gi;
        if(!s.match(myreg)){
        alert("\u8eab\u4efd\u8bc1\u53f7\u683c\u5f0f\u4e0d\u6b63\u786e\uff01");
        return;
        }
      }
      //\u8eab\u9ad8\u9a8c\u8bc1
    if(document.all.stature.value!="" || document.all.stature.value.length>0){
    var s=document.all.stature.value;
    var myreg = /^(\d{2}|\d{3})$/gi;
        if(!s.match(myreg)){
        alert("\u8eab\u9ad8\u4ee5\u5398\u7c73\u4e3a\u5355\u4f4d\uff0c\u957f\u5ea6\u4e3a2-3\u4e2a\u5b57\u7b26\uff01");
        return;
        }
      }
      
       //\u9a8c\u8bc1\u7535\u8bdd\u53f7\u7801
    if(document.all.telephone.value!="" || document.all.telephone.value.length>0){
    var s=document.all.telephone.value;
    var myreg = /(\d{3}-|\d{4}-)?(\d{8}|\d{7})/gi;
        if(!s.match(myreg)){
        alert("\u7535\u8bdd\u53f7\u7801\u683c\u5f0f\u4e0d\u6b63\u786e!");
        return;
        }
      }
       //\u9a8c\u8bc1\u624b\u673a\u53f7\u7801
    if(document.all.mobilephone.value!="" || document.all.mobilephone.value.length>0){
    var s=document.all.mobilephone.value;
    var myreg = /^(130|131|132|133|134|135|136|137|138|139|15\d{1}|18\d{1})\d{8}$/gi;
        if(!s.match(myreg)){
        alert("\u624b\u673a\u53f7\u7801\u683c\u5f0f\u4e0d\u6b63\u786e!");
        return;
        }
      }
      
    //\u9a8c\u8bc1email
    if(document.all.email.value!="" || document.all.email.value.length>0){
    var s=document.all.email.value;
    var myreg = /\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/gi;
        if(!s.match(myreg)){
        alert("\u7535\u5b50\u90ae\u7bb1\u683c\u5f0f\u4e0d\u6b63\u786e!");
        return;
        }
      }
      
     //\u9a8c\u8bc1\u4e2a\u4eba\u4e3b\u9875
    if(document.all.homepage.value!="" || document.all.homepage.value.length>0){
    var s=document.all.homepage.value;
    var myreg = /^[a-zA-z]+:\/\/(\w+(-\w+)*)(\.(\w+(-\w+)*))*(\?\S*)?$/gi;
        if(!s.match(myreg)){
        alert("\u4e2a\u4eba\u4e3b\u9875\u683c\u5f0f\u4e0d\u6b63\u786e!");
        return;
        }
      }
      //\u9a8c\u8bc1\u90ae\u653f\u7f16\u7801
    if(document.all.postalcode.value!="" || document.all.postalcode.value.length>0){
    var s=document.all.postalcode.value;
    var myreg = /[1-9]\d{5}(?!\d)/gi;
        if(!s.match(myreg)){
        alert("\u90ae\u653f\u7f16\u7801\u683c\u5f0f\u4e0d\u6b63\u786e!");
        return;
        }
      }
	document.forms[0].method.value=methodflag;
}

//\u68c0\u67e5\u7528\u6237\u540d\u662f\u5426\u5b58\u5728
function checkLoginName(){
        var lname = document.all.loginName.value;
        if(lname=="" || lname.length<0){
        alert("\u5bf9\u4e0d\u8d77\uff0c\u7528\u6237\u540d\u4e0d\u80fd\u4e3a\u7a7a\uff01");
        document.all.loginName.value="";
        document.all.loginName.focus();
        }else{
    	var url = '/com/checkloginname.do';
        var pars = 'lname='+lname;
     
        var myAjax = new Ajax.Updater({success:'checkloginname'}, url, {method: 'get', parameters: pars});
        }
    	}
 //\u5bc6\u7801\u6838\u5bf9
	function checkPwd(){
		if (document.all.password.value != document.all.repassword.value){
			alert('\u5bf9\u4e0d\u8d77\uff0c\u4e24\u6b21\u8f93\u5165\u7684\u5bc6\u7801\u4e0d\u4e00\u81f4\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165\uff01');
			document.all.password.value = "";
			document.all.repassword.value ="";
			document.all.password.focus();
		}
	}
